package com.aspose.cells;

class zdc extends zbz {
   private int a;
   private short d;

   zdc(short var1, String var2, int var3) throws Exception {
      this.c(133);
      this.a = 0;
      this.d = var1;
      this.b = var3;
      byte[] var5 = Encoding.getUnicode().a(var2);
      boolean var6 = false;

      int var7;
      for(var7 = 0; var7 < var5.length; ++var7) {
         if (var7 % 2 == 0) {
            if ((var5[var7] & 255) > 127) {
               var6 = true;
               break;
            }
         } else if (var5[var7] != 0) {
            var6 = true;
            break;
         }
      }

      if (var6) {
         this.c = new byte[2 * var2.length() + 2];
         this.c[0] = (byte)var2.length();
         this.c[1] = 1;
         System.arraycopy(var5, 0, this.c, 2, var5.length);
         this.a((short)(8 + 2 * var2.length()));
      } else {
         this.c = new byte[var2.length() + 2];
         this.c[0] = (byte)var2.length();
         byte[] var4 = new byte[var2.length()];
         this.c[1] = 0;

         for(var7 = 0; var7 < var4.length; ++var7) {
            var4[var7] = var5[2 * var7];
         }

         System.arraycopy(var4, 0, this.c, 2, var4.length);
         this.a((short)(8 + var2.length()));
      }

   }

   void a(zqa var1) throws Exception {
      var1.a(this.f());
      var1.a(this.d());
      var1.a(this.a);
      var1.a(this.d);
      var1.a(this.c);
   }
}
